import React from 'react';
import SelectOptions from './select.jsx';



let attrArr = [
  {type:3,name:'字符串'},
  {type:1,name:'整数'},
  {type:2,name:'小数'},
  {type:4,name:'文本'},
  {type:5,name:'文章'},
  {type:6,name:'枚举'},
  {type:7,name:'日期'}
];

class Home extends React.Component{
  constructor(props){
    super(props);
    this.changTitle = this.changTitle.bind(this);
    this.state ={title: '下拉选择',change:false};
  }
  changTitle(e,arr){
    this.setState({
      title:arr
    })
  }
  render(){
    return (
        <div className="title">
          {this.state.title}
          <SelectOptions options ={attrArr} change = {this.changTitle.bind(this,name)} />
        </div>
    )
  }
}







const PageOne = () => (
<div>PageOne</div>
);
const PageTwo = () => (
<div>PageTwo</div>
);
export {
  Home,
  PageOne,
  PageTwo

}